<template>
  <div id="app">
    <keep-alive :exclude="['FindRoom', 'Map']">
    <router-view/>
  </keep-alive>
    <van-overlay :show="$store.state.UserOverlay" z-index="999"/>
  </div>
</template>
<script>
export default {
  mounted () {
    this.$bus.$on('loading', this.loading)
    this.$bus.$on('clear', this.clear)
    this.$bus.$on('fail', this.fail)
  },
  methods: {
    loading () {
      // 加载状态
      this.$toast.loading({
        message: '加载中...',
        duration: 999999
      })
    },
    clear () {
      // 关闭加载
      this.$toast.clear()
    },
    fail () {
      this.$toast.fail('出错了，请重试')
    }
  }
}
</script>
<style lang="less">
* {
  margin: 0;
  padding:0;
}
</style>
